<template>
    <view class="wrapper">

        <view class="item-up">
            <view class="item-list">
                <view class="item-left">
                    服务金额
                </view>
                <view class="item-right">
                    ¥ {{Number(services.originalAmount).toFixed(2)}}
                </view>
            </view>


            <view class="item-list">
                <view class="item-left">
                    优惠金额
                </view>
                <view class="item-right">
                    -¥ {{disCountPrice}}
                </view>
            </view>
        </view>


    <view class="item-bottom">
        <view class="bottom-text">
            合计: ¥ {{Number(services.payAmount).toFixed(2)}}
        </view>
    </view>
        

        
        
    </view>
</template>


<script>
export default {
    props:{
        serviceInfo:{
            type:Object,
            default:()=>{}
        }
    },

    data () {

        return {
                 services:{},
                 disCountPrice: 0
        }

    },

    mounted() {


        this.services = this.serviceInfo
        // 折扣价格

        this.disCountPrice = Number(this.services.originalAmount).toFixed(2) - Number(this.services.payAmount).toFixed(2)
        this.disCountPrice = Number(this.disCountPrice).toFixed(2)



    }
    
}
</script>



<style lang="less" scoped>

.item-list{
    display: flex;
    justify-content: space-between;
    .item-left{
        color: #666;
        
    }
    .item-right{
        font-size: 13px;
        color: #ABABAB;
    }
    &:last-child{
        margin-top: 10px ;
        padding-bottom: 10px;
        border-bottom: 1px solid #f5f5f5;
        
    }



}


    .item-bottom{
        display: flex;
        justify-content: flex-end;
         padding-top: 10px;
         .bottom-text{
             color: #FE542F;
             font-size: 14px;
             font-weight: 600;
         }
      
    }

</style>